/**
  ******************************************************************************
  * @file           : dwlcd.h
  * @brief          : Header for dwlcd.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __DWLCD_H
#define __DWLCD_H

#include <stdint.h>
#include "tskcfg.h"
#include "lcdbsp.h"

#define HEADER1                    0x5AU
#define HEADER2                    0xA5U
#define DWLCD_FRM_MAXLEN           168

#define DWQUE_RX_LENGTH            10
#define DWQUE_RX_ITEMSIZE          sizeof(Dw_RxBufType)
#define DWQUE_TX_LENGTH            10
#define DWQUE_TX_ITEMSIZE          sizeof(Dw_TxBufType)
	
typedef enum
{
	DW_STATE_HEAD1    = 0x00U,
	DW_STATE_HEAD2,
	DW_STATE_LENGTH,
	DW_STATE_CMD,
	DW_STATE_DATA
}Dw_RxStateType;

typedef struct
{
	uint8_t len;
	uint8_t cmd;
	uint8_t rxcnt;
  uint8_t dummy;
	uint8_t dat[DWLCD_FRM_MAXLEN];
}Dw_RxBufType;

typedef struct
{
	uint8_t len;
  uint8_t dummy1;
  uint8_t dummy2;
  uint8_t dummy3;
	uint8_t dat[DWLCD_FRM_MAXLEN];
}Dw_TxBufType;

extern void DW_Send_devlist(void);
extern void DW_Send_changeid(void);
extern void DW_Send_devinfo(void);
extern void DW_Send_ec_mode(void);
extern void DW_Send_ec_para_jt(void);
extern void DW_Send_ec_para_dl(void);
extern void DW_Send_ec_para_sk(void);
extern void DW_Send_ec_para_td(void);
extern void DW_Send_temp(void);
extern void DW_Send_rilcl(void);
extern void DW_Send_nodetemp(void);
extern void DW_Send_bpq(void);

#endif
